#pragma once 
#include <stdio.h>

#define SIZE 1024

#define NONE_FLUSH 1
#define LINE_FLUSH 2
#define FULL_FLUSH 3

typedef struct _myFILE
{
    int fd;
    int flags;
    int flush_mode;
    char outbuffer[SIZE];
    int pos;
    int cap;
}myFILE;

myFILE *myfopen(const char *path, const char *mode);
int myfputs(const char* s, myFILE *fp);
void myfflush(myFILE *fp);
void myfclose(myFILE *fp);

